class Solution
{
public:
    double trimMean(vector<int> &arr)
    {
        sort(arr.begin(), arr.end());
        int n = arr.size();
        int sum = 0;
        for (int i = n / 20; i < n - n / 20; ++i)
        {
            sum += arr[i];
        }
        double average = 1.0 * sum / (n * 0.9);
        return average;
    }
};